<template>
  <div class="app">
    <h4>父组件</h4>

    <BaseForm ref="handleForm"></BaseForm>

    <button @click="getFrom">获取表单数据</button>
    <button @click="setForm">重置表单数据</button>
  </div>
</template>

<script>
import BaseForm from "./components/BaseForm.vue";
export default {
  components: {
    BaseForm,
  },
  methods: {
    getFrom() {
      console.log(this.$refs.handleForm.getFormData());
    },
    setForm() {
      this.$refs.handleForm.resetFormData();
    },
  },
};
</script>

<style></style>
